﻿@model CHGK.web.UI.Models.CheckAnswerModel

@{
    ViewBag.Title = "Проверка ответа";
    Layout = "~/Views/Shared/_LayoutSuperuser.cshtml";
}

<h2>Проверка ответа</h2>

@using (Html.BeginForm())
{
    if (Model.Answer == null)
    {
            <p>
                @Html.HiddenFor(m => m.CompetitionID, Model.CompetitionID)
            </p>
    
            <div class="editor-label">
                Номер команды
            </div>
            <div class="editor-field">
                @Html.ValidationMessage("TeamNumber") <br />
                @Html.TextBoxFor(m => m.TeamNumber) 
            </div>

            <div class="editor-label">
                Номер вопроса
            </div>
            <div class="editor-field">
              @Html.ValidationMessage("QuestionNumber") <br />
              @Html.TextBoxFor(m => m.QuestionNumber)
            </div>
            <div class="editor-label">
                Номер тура
            </div>
            <div class="editor-field">
              @Html.ValidationMessage("TourNumber") <br />
              @Html.TextBoxFor(m => m.TourNumber)
            </div>
              @Html.ValidationMessage("Answer") <br />
            <p>
                <input type = "submit", value = "Найти" />
            </p>
    }
    else
    {
                <p>
                 @Html.HiddenFor(m => m.CompetitionID, Model.CompetitionID)
                 @Html.HiddenFor(m => m.TeamNumber, Model.TeamNumber)
                 @Html.HiddenFor(m => m.QuestionNumber, Model.QuestionNumber)
                 @Html.HiddenFor(m => m.TourNumber, Model.TourNumber)
                 @Html.HiddenFor(m => m.Answer, Model.Answer)
                </p>
                <p>
                    Номер команды <br />
                    @Html.DisplayFor(m => m.TeamNumber, Model.TeamNumber)
                </p>
                <p>
                    Номер вопроса <br />
                    @Html.DisplayFor(m => m.QuestionNumber, Model.QuestionNumber)
                </p>
                <p>
                    Номер тура <br />
                    @Html.DisplayFor(m => m.TourNumber, Model.TourNumber)
                </p>
                <p>
                    Ответ команды
                </p>
                <p>
                    @Html.DisplayFor(m => m.Answer, Model.Answer)
                </p>
                <div class="editor-label">
                    @Html.CheckBox("IsCorrect", Model.IsCorrect)
                    Правильно?
                </div>
                <p>
                     <input type = "submit", value = "Ок" />
                </p>
     }
}
